package com.example.paytext.controller;

import com.example.paytext.VO.PayRecordVO;
import com.example.paytext.domain.PayRecord;
import com.example.paytext.service.PayRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/payRecord")
public class PayRecordController {
    @Autowired
    private PayRecordService recordService;

    /**
     * 查询用户钱包金额变动明细的接口
     * @param userId
     * @return
     */
    @RequestMapping("/getPayRecord")
    public List<PayRecordVO> getPayRecord(@RequestParam(value = "userId") String userId){
        return recordService.getPayRecord(userId);
    }

}
